import React, {Component} from 'react';
import PropTypes from "prop-types";
class BookList extends Component {
    static defaultProps = {
        bookInfo:{
            bookList:[]
        }
    }
    render() {
        console.log(this.props.bookInfo)
        return (
            <div>
                {
                    this.props.render()
                }
                {
                    this.props.bookInfo.bookList.map(item=>(
                        <div key={item.id}>
                            <h5>{item.bookName}</h5>
                            <img width={100} src={item.bookImg} alt=""/>
                        </div>
                    ))
                }
            </div>
        );
    }
}

export default BookList;